31 research outputs found
Reasoning about Threads with Bounded Lock Chains
The problem of model checking threads interacting purely via the standard synchronization primitives is key for many concurrent program analyses, particularly dataflow analysis. Unfortunately, it is undecidable even for the most commonly used synchronization primitive, i.e., mutex locks. Lock usage in concurrent programs can be characterized in terms of lock chains, where a sequence of mutex locks is said to be chained if the scopes of adjacent (non-nested) mutexes overlap. Although the model checking problem for fragments of Linear Temporal Logic (LTL) is known to be decidable for threads interacting via nested locks, i.e., chains of length one, these techniques don’t extend to pro-grams with non-nested locks used in crucial applications like databases and device drivers. We exploit the fact that lock usage patterns in real life programs do not produce unbounded lock chains. For such a framework, we show, by using the new concept of Lock Causality Automata (LCA), that pre∗-closures of regular sets of states can be computed efficiently. Leveraging this new technique then allows us to formulate decision procedures for model checking threads communicating via bounded lock chains for fragments of LTL. Our new results narrow the decidability gap for LTL model checking of threads communicating via locks by pro-viding a more refined characterization for it in terms of boundedness of lock chains rather than the current state-of-the-art, i.e., nestedness of locks (chains of length one).
Software Verification for Weak Memory via Program Transformation
Despite multiprocessors implementing weak memory models, verification methods
often assume Sequential Consistency (SC), thus may miss bugs due to weak
memory. We propose a sound transformation of the program to verify, enabling SC
tools to perform verification w.r.t. weak memory. We present experiments for a
broad variety of models (from x86/TSO to Power/ARM) and a vast range of
verification tools, quantify the additional cost of the transformation and
highlight the cases when we can drastically reduce it. Our benchmarks include
work-queue management code from PostgreSQL
Scope-bounded pushdown languages
We study the formal language theory of multistack push-down automata (Mpa) restricted to computations where a symbol can be popped from a stack S only if it was pushed within a bounded number of contexts of S (scoped Mpa). We contribute to show that scoped Mpa are indeed a robust model of computation, by focusing on the corresponding theory of visibly Mpa (Mvpa). We prove the equivalence of the deterministic and nondeterministic versions and show that scope-bounded computations of an n-stack Mvpa can be simulated, rearranging the input word, by using only one stack. These results have several interesting consequences, such as, the closure under complement, the decidability of universality, inclusion and equality, and a Parikh theorem. We also give a logical characterization and compare the expressiveness of the scope-bounded restriction with Mvpa classes from the literature
Context-bounded analysis of tso systems
We address the state reachability problem in concurrent programs running over the TSO weak memory model. This problem has been shown to be decidable with non-primitive recursive complexity in the case of finite-state threads. For recursive threads this problem is undecidable. The aim of this paper is to provide under-approximate analyses for TSO systems that are decidable and have better (elementary) complexity. We propose three bounding concepts for TSO behaviors that are inspired from the concept of bounding the number of context switches introduced by Qadeer and Rehof for the sequentially consistent (SC) model. We investigate the decidability and the complexity of the state reachability problems under these three bounding concepts for TSO, and provide reduction of these problems to known reachability problems of concurrent systems under the SC semantics
A Verification-Based Approach to Memory Fence Insertion in PSO Memory Systems
peer reviewedThis paper addresses the problem of verifying and correcting programs when they
are moved from a sequential consistency execution environment to a relaxed
memory context. Specifically, it considers the PSO (Partial Store Order)
memory model, which corresponds to the use of a store buffer for each shared
variable and each process. We also will consider, as an intermediate step, the
TSO (Total Store Order) memory model, which corresponds to the use of one store
buffer per process.
The proposed approach extends a previously developed verification tool that uses
finite automata to symbolically represent the possible contents of the store
buffers. Its starting point is a program that is correct for the usual
Sequential Consistency (SC) memory model, but that might be incorrect under PSO with
respect to safety properties.
This program is then first analyzed and corrected for the TSO memory model, and
then this TSO-safe program is analyzed and corrected under PSO, producing a
PSO-safe program. To obtain a TSO-safe program, only store-load fences (TSO
only allows store-load relaxations) are introduced into the program. Finaly, to
produce a PSO-safe program, only store-store fences (PSO
additionally allows store-store relaxations) are introduced.
An advantage of our technique is that the underlying symbolic verification tool
makes a full exploration of program behaviors possible even for cyclic
programs, which makes our approach broadly applicable. The method has been
tested with an experimental implementation and can effectively handle a series
of classical examples
Verifying concurrent programs by memory unwinding
We describe a new sequentialization-based approach to the symbolic verification of multi-threaded programs with shared memory and dynamic thread creation. Its main novelty is the idea of memory unwinding, i.e., an explicit representation of the sequence of write operations into the shared memory. For the verification, we nondeterministically guess this unwinding and then simulate the behavior of the program according to any scheduling that respects this guess. This approach is complementary to other sequentializations and explores an orthogonal dimension, i.e., the number of write operations. It also simplifies the implementation of several important optimizations, in particular the targeted exposure of individual writes. We implemented this approach as code-to-code transformation from multi-threaded into nondeterministic sequential programs, which allows the reuse of sequential verification tools. Experiments show that our approach is very promising: it found all errors in the concurrency category of SV-COMP15
Predicate Abstraction for Relaxed Memory Models
Abstract. We present a novel approach for predicate abstraction of programs running on relaxed memory models. Our approach consists of two steps. First, we reduce the problem of verifying a program P running on a memory model M to the problem of verifying a program PM that captures an abstraction of M as part of the program. Second, we present a new technique for discovering predicates that enable verification of PM. The core idea is to extrapolate from the predicates used to verify P under sequential consistency. A key new concept is that of cube extrapolation: it successfully avoids exponential state explosion when abstracting PM. We implemented our approach for the x86 TSO and PSO memory models and showed that predicates discovered via extrapolation are powerful enough to verify several challenging concurrent programs. This is the first time some of these programs have been verified for a model as relaxed as PSO.
An Automata-Based Symbolic Approach for Verifying Programs on Relaxed Memory Models
peer reviewedThis paper addresses the problem of verifying programs for the relaxed memory
models implemented in modern processors. Specifically, it considers the TSO
(Total Store Order) relaxation, which corresponds to the use of store buffers.
The proposed approach proceeds by using finite automata to symbolically
represent the possible contents of the store buffers. Store, load and commit
operations then correspond to operations on these finite automata.
The advantage of this approach is that it operates on (potentially infinite)
sets of buffer contents, rather than on individual buffer configurations. This
provides a way to tame the explosion of the number of possible buffer
configurations, while preserving the full generality of the analysis. It is thus
possible to check even designs that exploit the relaxed memory model in unusual
ways. An experimental implementation has been used to validate the feasibility
of the approach